package com.ddstation.home_page.mapper;

import com.ddstation.home_page.entity.DtInvsMessageQueueEntity;
import com.ddstation.home_page.model.CheckMessageModel;
import com.ddstation.home_page.model.HpCommonParModel;
import com.ddstation.home_page.model.MapModel;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DtInvsMessageQueueMapper {

	// 获取是否有新消息
	CheckMessageModel checkMessage(@Param("ua") String ua);
	// 新增浏览器记录
	int insertMessageUa(@Param("ua") String ua);
	// 更新浏览器记录
	int updateMessageUa(@Param("ua") String ua, @Param("lastMessageQueueId") Integer lastMessageQueueId);
	// 获取消息记录
	List<DtInvsMessageQueueEntity> selectInvsMessageQueue(@Param("minId") Integer minId, @Param("maxId") Integer maxId);
	List<MapModel> selectBadPracticingTown(@Param("invsInstitutionId") String invsInstitutionId, @Param("_p") HpCommonParModel _p, @Param("list") List<DtInvsMessageQueueEntity> list);
	// 新增消息记录
	int insert(DtInvsMessageQueueEntity entity);

	public int updateQueueStatus(
			@Param("institutionId") String institutionId
			, @Param("businessSubType") Integer businessSubType
			, @Param("messageType") Integer messageType
			, @Param("targetIds") List<String> targetIds);

	int insertMessageQueue(List<DtInvsMessageQueueEntity> queues);

	int insertByList(List<DtInvsMessageQueueEntity> list);

    int insertReplace(DtInvsMessageQueueEntity record);

	// 获取最近6条消息记录 add by zxb 2020.6.2
	List<MapModel> selectInvsMonitorMessageQueue(@Param("invsInstitutionId") String invsInstitutionId);
}
 